import {createRouter,createWebHistory} from 'vue-router'

//一级路由
import Login from '../pages/Login/IndexLogin'
import Regist from '../pages/Login/IndexRegist'
import Home from '../pages/Home/IndexHome'
import Interaction from '../pages/Interaction/IndexInteraction'
import Mall from '../pages/Mall/IndexMall'

import Mine from '../pages/Mine/IndexMine'
import IndexKnowledge from '../pages/Mine/knowledge/IndexKnowledge'
import IndexOrders from '../pages/Mine/orders/IndexOrders'
import IndexPet from '../pages/Mine/pet/IndexPet'
import IndexMissing from '../pages/Mine/missing/IndexMissing'
import IndexTiming from '../pages/Mine/timing/IndexTiming'

import IndexGuide from '../pages/guide/IndexGuide'

export default createRouter({
    history:createWebHistory(),
    routes:[
        
        {
            path:'/login',
            name:'login',
            component:Login
        },
        {
            path:'/regist',
            name:'regist',
            component:Regist
        },
        {
            path:'/home',
            name:'home',
            component:Home,
            meta:{
                keepAlive:true
            }
        },
        {
            path:'/interaction',
            name:'interaction',
            component:Interaction,
            meta:{
                keepAlive:true
            }
        },
        {
            path:'/mall',
            name:'mall',
            component:Mall,
            meta:{
                keepAlive:true
            }
        },
        {
            path:'/mine',
            name:'mine',
            component:Mine,
            meta:{
                keepAlive:true
            }
        },
        {
            path:'/indexknowledge',
            name:'indexknowledge',
            component:IndexKnowledge,
            meta:{
                keepAlive:false
            }
        },
        {
            path:'/indexorders',
            name:'indexorders',
            component:IndexOrders,
            meta:{
                keepAlive:false
            }
        },
        {
            path:'/indexpet',
            name:'indexpet',
            component:IndexPet,
            meta:{
                keepAlive:false
            }
        },
        {
            path:'/indexmissing',
            name:'indexmissing',
            component:IndexMissing,
            meta:{
                keepAlive:false
            }
        },
        {
            path:'/indextiming',
            name:'indextiming',
            component:IndexTiming,
            meta:{
                keepAlive:false
            }
        },
        {
            path:'/indexguide',
            name:'indexguide',
            component:IndexGuide,
            meta:{
                keepAlive:false
            }
        },
        {
            path:'/',redirect:'/indexguide'
        },
    ]
})